<template>
  <view class="about-container">
    <view class="header-section text-center">
      <image style="width: 150rpx;height: 150rpx;" src="/static/logo.png" mode="widthFix">
      </image>
      <uni-title type="h2" title="美控移动端"></uni-title>
    </view>

    <view class="content-section">
      <view class="menu-list">
        <view class="list-cell list-cell-arrow">
          <view class="menu-item-box">
            <view>公司地址</view>
            <text class="text-right" selectable="true">{{companyData!=''?companyData.companyAddress:''}}</text>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item-box">
            <view>公司邮箱</view>
            <text class="text-right" selectable="true">{{companyData!=''?companyData.companyEmail:''}}</text>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item-box">
            <view>公司电话</view>
            <text class="text-right" selectable="true">{{companyData!=''?companyData.companyPhone:''}}</text>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item-box">
            <view>公司网站</view>
            <view class="text-right">
              <uni-link :href="companyData!=''?companyData.companyWebsite:''" :text="companyData!=''?companyData.companyWebsite:''" showUnderLine="false"></uni-link>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="copyright">
      <view>{{companyData!=''?companyData.companyCopyright:''}}</view>
    </view>
  </view>
</template>

<script>
  import {
    getCompany
  } from "@/api/system/company/company.js"
  export default {
    data() {
      return {
        companyId:1,
        companyData:''
      }
    },
    onLoad() {
     this.getCompany()
    },
    methods:{
     getCompany:async function(){
      const res = await getCompany(this.companyId)
      if(res.code==200){
        this.companyData=res.data
      }else{
        uni.showToast({
                  title: "查询失败",
                  icon: 'error'
        })
      }
     } 
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #f8f8f8;
  }

  .copyright {
    margin-top: 50rpx;
    text-align: center;
    line-height: 60rpx;
    color: #999;
  }

  .header-section {
    display: flex;
    padding: 30rpx 0 0;
    flex-direction: column;
    align-items: center;
  }
</style>
